#include<bits/stdc++.h>
using namespace std;
namespace IO{
    const int BUF=1<<21;
    char buff[BUF],*p1=buff,*p2=buff;
    #define getchar() (p1==p2&&(p2=((p1=buff)+fread(buff,1,BUF,stdin)),p1==p2)?EOF:*p1++)
    template<typename T>inline void read(T &x){
        char ch=getchar();x=0;int f=1;
        while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
        while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
        x*=f;
    }
    char obuf[BUF],*p3=obuf;
    inline void pc(char ch){
        if(p3-obuf<BUF) *p3++=ch;
        else fwrite(obuf,p3-obuf,1,stdout),p3=obuf,*p3++=ch;
    }
    inline void put(const int *s){while(*s) pc(*s),++s;}
    char ch[32],ctop;
    template<typename T>inline void print(T x){
    	if(x<0) x=~x+1,pc('-');
        if(!x) return pc(48);
        while(x) ch[++ctop]=x%10^48,x/=10;
        while(ctop) pc(ch[ctop--]);
    }
    inline void flush(){fwrite(obuf,p3-obuf,1,stdout);}
}
using namespace IO;
const int N=2e5+5;
int n,a[N],q,sum[N],f[N];
int ans;
inline int sol(){
	int mx=a[n]-sum[n-1];
	for(int i=n-1;i>1;--i){
		f[i]=mx+sum[i];
		mx=max(mx,a[i]-sum[i-1]-f[i]);
	}
	return f[2]+a[1]-a[2];
}
int main(){
	freopen("pockets.in","r",stdin);
	freopen("pockets.out","w",stdout);
	read(n);
	for(int i=1;i<n;++i) read(a[i]),sum[i]=sum[i-1]+a[i];
	read(q);
	while(q--){
		read(a[n]);
		if(a[n]>1e6) print(a[n]+a[1]-(sum[n-1]-a[1])),pc('\n');
		else print(sol()),pc('\n');
	}
	flush();
	return 0;
}

